/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.model;
import java.util.Date;

import com.legendshop.dao.persistence.Column;
import com.legendshop.dao.persistence.Entity;
import com.legendshop.dao.persistence.GeneratedValue;
import com.legendshop.dao.persistence.GenerationType;
import com.legendshop.dao.persistence.Id;
import com.legendshop.dao.persistence.Table;
import com.legendshop.dao.persistence.TableGenerator;
import com.legendshop.dao.persistence.Transient;
import com.legendshop.dao.support.GenericEntity;

/**
 *
 */
@Entity
@Table(name = "ls_task")
public class Task implements GenericEntity<Long> {

	private static final long serialVersionUID = -4578143816379129949L;

	/** 项目主键 */
	private Long id; 
		
	/** 项目Id */
	private Long projectId; 
	
	/** 项目名称 */
	private String projectName;
		
	/** 项目模块Id */
	private Long moduleId;

	/** 里程碑（计划）Id */
	private Long planId;
	
	/** 项目模块名称 */
	private String moduleName;  //模块名称
		
	/** 任务名称 */
	private String name; 
		
	/** 任务状态, 0:未开始, 1:正在进行, 2: 挂起, 3, 延期, 4:已结束. */
	private Long type; 
		
	/** 优先级 */
	private Long priority; 
		
	/** 预估时间 */
	private Double estimateHours; 
		
	/** 实际消耗工时,可以通过工时填报统计出来totalConsumed */
	private Double actualHours; 
	
	private Double totalConsumed;//任务总消耗
		
	/** 项目剩余时间 */
	private Double leftHours; 
	
	/** 任务进度 */
	private Double rate; 
		
	/** 截止日期 */
	private Date deadline;

	/** 截止日期字符串，免得layui出错 */
	private String deadlineStr;

	/**  项目状态, 0:未开始, 1:正在进行, 2: 挂起, 3, 延期, 4:已结束. */
	private Integer status; 
		
	/** 颜色代码 */
	private String color; 
		
	/** 邮件发给谁，默认可以发邮件 */
	private String mailto; 
		
	/** 任务详细描述 */
	private String memo; 
		
	/** 由谁来打开 */
	private String openedby; 
		
	/** 打开时间 */
	private Date openeddate; 
		
	/** 分配给哪个用户名称 */
	private String assignedto; 
	
	/** 分配给哪个用户真实名称 */
	private String assignedtoRealName; 
		
	/** 分配时间 */
	private Date assigneddate; 
		
	/** 预计开始时间 */
	private Date eststarted; 
		
	/** 真正开始的时间 */
	private Date realstarted; 
		
	/** 由谁结束 */
	private String finishedby; 
	
	/** 由谁结束 */
	private String finishedbyRealName; 
		
	/** 结束时间 */
	private Date finisheddate; 
		
	/** 由谁来取消 */
	private String canceledby; 
		
	/** 取消时间 */
	private Date canceleddate; 
		
	/** 有谁来关闭 */
	private String closedby; 
		
	/** 关闭时间 */
	private Date closeddate; 
		
	/** 关闭原因 */
	private String closedreason; 
		
	/** 最后的编辑人 */
	private String lasteditedby; 
		
	/** 最后的编辑时间 */
	private Date lastediteddate; 
		
	/** 是否删除,1:删除，0：未删除 */
	private int deleted; 
	
	private Date createTime;

	/** 用于界面展示， 免得layui报错**/
	private String createTimeStr;
	
	private String createBy;
	
	private String remark;
	
	private Project project; //项目

	
	public Task() {
    }
		
	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "generator")
	@TableGenerator(name = "generator", pkColumnValue = "TASK_SEQ")
	public Long  getId(){
		return id;
	} 
		
	public void setId(Long id){
			this.id = id;
		}
		
    @Column(name = "project_id")
	public Long  getProjectId(){
		return projectId;
	} 
		
	public void setProjectId(Long projectId){
			this.projectId = projectId;
		}
		
    @Column(name = "module_id")
	public Long  getModuleId(){
		return moduleId;
	} 
		
	public void setModuleId(Long moduleId){
			this.moduleId = moduleId;
		}
		
    @Column(name = "name")
	public String  getName(){
		return name;
	} 
		
	public void setName(String name){
			this.name = name;
		}
		
    @Column(name = "type")
	public Long  getType(){
		return type;
	} 
		
	public void setType(Long type){
			this.type = type;
		}
		
    @Column(name = "priority")
	public Long  getPriority(){
		return priority;
	} 
		
	public void setPriority(Long priority){
			this.priority = priority;
		}
		
    @Column(name = "estimate_hours")
	public Double  getEstimateHours(){
		return estimateHours;
	} 
		
	public void setEstimateHours(Double estimateHours){
			this.estimateHours = estimateHours;
		}
		
    @Column(name = "actual_hours")
	public Double  getActualHours(){
		return actualHours;
	} 
		
	public void setActualHours(Double actualHours){
			this.actualHours = actualHours;
		}
		
    @Column(name = "left_hours")
	public Double  getLeftHours(){
		return leftHours;
	} 
		
	public void setLeftHours(Double leftHours){
			this.leftHours = leftHours;
		}
		
    @Column(name = "deadline")
	public Date  getDeadline(){
		return deadline;
	} 
		
	public void setDeadline(Date deadline){
			this.deadline = deadline;
		}
		
    @Column(name = "status")
	public Integer  getStatus(){
		return status;
	} 
		
	public void setStatus(Integer status){
			this.status = status;
		}
		
    @Column(name = "color")
	public String  getColor(){
		return color;
	} 
		
	public void setColor(String color){
			this.color = color;
		}
		
    @Column(name = "mailto")
	public String  getMailto(){
		return mailto;
	} 
		
	public void setMailto(String mailto){
			this.mailto = mailto;
		}
		
    @Column(name = "memo")
	public String  getMemo(){
		return memo;
	} 
		
	public void setMemo(String memo){
			this.memo = memo;
		}
		
    @Column(name = "openedBy")
	public String  getOpenedby(){
		return openedby;
	} 
		
	public void setOpenedby(String openedby){
			this.openedby = openedby;
		}
		
    @Column(name = "openedDate")
	public Date  getOpeneddate(){
		return openeddate;
	} 
		
	public void setOpeneddate(Date openeddate){
			this.openeddate = openeddate;
		}
		
    @Column(name = "assignedTo")
	public String  getAssignedto(){
		return assignedto;
	} 
		
	public void setAssignedto(String assignedto){
			this.assignedto = assignedto;
		}
		
    @Column(name = "assignedDate")
	public Date  getAssigneddate(){
		return assigneddate;
	} 
		
	public void setAssigneddate(Date assigneddate){
			this.assigneddate = assigneddate;
		}
		
    @Column(name = "estStarted")
	public Date  getEststarted(){
		return eststarted;
	} 
		
	public void setEststarted(Date eststarted){
			this.eststarted = eststarted;
		}
		
    @Column(name = "realStarted")
	public Date  getRealstarted(){
		return realstarted;
	} 
		
	public void setRealstarted(Date realstarted){
			this.realstarted = realstarted;
		}
		
    @Column(name = "finishedBy")
	public String  getFinishedby(){
		return finishedby;
	} 
		
	public void setFinishedby(String finishedby){
			this.finishedby = finishedby;
		}
		
    @Column(name = "finishedDate")
	public Date  getFinisheddate(){
		return finisheddate;
	} 
		
	public void setFinisheddate(Date finisheddate){
			this.finisheddate = finisheddate;
		}
		
    @Column(name = "canceledBy")
	public String  getCanceledby(){
		return canceledby;
	} 
		
	public void setCanceledby(String canceledby){
			this.canceledby = canceledby;
		}
		
    @Column(name = "canceledDate")
	public Date  getCanceleddate(){
		return canceleddate;
	} 
		
	public void setCanceleddate(Date canceleddate){
			this.canceleddate = canceleddate;
		}
		
    @Column(name = "closedBy")
	public String  getClosedby(){
		return closedby;
	} 
		
	public void setClosedby(String closedby){
			this.closedby = closedby;
		}
		
    @Column(name = "closedDate")
	public Date  getCloseddate(){
		return closeddate;
	} 
		
	public void setCloseddate(Date closeddate){
			this.closeddate = closeddate;
		}
		
    @Column(name = "closedReason")
	public String  getClosedreason(){
		return closedreason;
	} 
		
	public void setClosedreason(String closedreason){
			this.closedreason = closedreason;
		}
		
    @Column(name = "lastEditedBy")
	public String  getLasteditedby(){
		return lasteditedby;
	} 
		
	public void setLasteditedby(String lasteditedby){
			this.lasteditedby = lasteditedby;
		}
		
    @Column(name = "lastEditedDate")
	public Date  getLastediteddate(){
		return lastediteddate;
	} 
		
	public void setLastediteddate(Date lastediteddate){
			this.lastediteddate = lastediteddate;
		}
		
    @Column(name = "deleted")
	public int  getDeleted(){
		return deleted;
	} 
		
	public void setDeleted(int deleted){
			this.deleted = deleted;
		}

	@Transient
	public String getAssignedtoRealName() {
		return assignedtoRealName;
	}

	public void setAssignedtoRealName(String assignedtoRealName) {
		this.assignedtoRealName = assignedtoRealName;
	}

    @Column(name = "createTime")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

    @Column(name = "rate")
	public Double getRate() {
		return rate;
	}

	public void setRate(Double rate) {
		this.rate = rate;
	}

    @Transient
	public String getModuleName() {
		return moduleName;
	}

	public void setModuleName(String moduleName) {
		this.moduleName = moduleName;
	}

    @Column(name = "createBy")
	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

    @Column(name = "remark")
	public String getRemark() {
		return remark;
	}

	@Column(name = "plan_id")
	public Long getPlanId() {
		return planId;
	}

	public void setPlanId(Long planId) {
		this.planId = planId;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Transient
	public Double getTotalConsumed() {
		return totalConsumed;
	}

	public void setTotalConsumed(Double totalConsumed) {
		this.totalConsumed = totalConsumed;
	}

	@Transient
	public Project getProject() {
		return project;
	}

	public void setProject(Project project) {
		this.project = project;
	}

	@Transient
	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	@Transient
	public String getFinishedbyRealName() {
		return finishedbyRealName;
	}

	public void setFinishedbyRealName(String finishedbyRealName) {
		this.finishedbyRealName = finishedbyRealName;
	}

	@Transient
	public String getDeadlineStr() {
		return deadlineStr;
	}

	public void setDeadlineStr(String deadlineStr) {
		this.deadlineStr = deadlineStr;
	}

	@Transient
	public String getCreateTimeStr() {
		return createTimeStr;
	}

	public void setCreateTimeStr(String createTimeStr) {
		this.createTimeStr = createTimeStr;
	}
}
